package com.k2091.washcar.service.impl;

import com.k2091.washcar.entity.FormInline;
import com.k2091.washcar.entity.UsersCar;
import com.k2091.washcar.mapper.UsersCarMapper;
import com.k2091.washcar.service.IUsersCarService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2021-06-02
 */
@Service
public class UsersCarServiceImpl extends ServiceImpl<UsersCarMapper, UsersCar> implements IUsersCarService {

    @Autowired
    private UsersCarMapper usersCarMapper;

    @Override
    public List<UsersCar> selectCar(FormInline formInline) {
        return usersCarMapper.selectCar(formInline);
    }

    @Override
    public UsersCar selectById(Long id) {
        return usersCarMapper.selectById(id);
    }

    @Override
    public void deleteCar(Long id){
        usersCarMapper.deleteById(id);
    }

    @Override
    public void upStatus(Long id, int status) {
        usersCarMapper.upStatus(id, status);
    }

    @Override
    public void upCar(UsersCar car) {
        usersCarMapper.updateById(car);
    }
}
